import React, { FC } from "react";
import { useSelector } from "react-redux";
import { itemType } from "../../store/todoList";
import { StateType } from "../../store";
const Tablelist: FC = () => {
  const formlist = useSelector<StateType>((state) => {
    return state.tofoReducer;
  }) as itemType[];
  return (
    <>
      {formlist.map((item: itemType) => {
        return (
          <div key={item.id}>
            {item.id} ----{item.name} --- {item.isCompleted + ""}
          </div>
        );
      })}
    </>
  );
};

export default Tablelist;
